package com.beidu.lottery.call.entity.query;

import com.beidu.lottery.call.entity.common.PageQuery;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;

/**
 * 前端投票组选项分页查询条件
 *
 * @author 北渡
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class PortalGroupOptionQuery extends PageQuery implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 作者名称/作品名称/编号
     */
    @NotEmpty(message = "关键字不能为空", groups = VoteSearch.class)
    private String keyword;

    /**
     * 活动ID
     */
    @NotNull(message = "活动ID不能为空")
    private Integer activityId;

    /**
     * 分组ID
     */
    @NotNull(message = "分组ID不能为空")
    private Integer groupId;

    /**
     * 排序方式（0:编号正序 ,1:人气倒序）
     */
    @NotNull(message = "排序方式不能为空")
    private Integer orderBy;

    /**
     * 选项搜索和缺省验证组
     */
    public interface VoteSearch extends Default {
    }

}
